package cn.tedu.controller;

import cn.tedu.pojo.Collect;
import cn.tedu.service.CollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
public class CollectController {
    @Autowired
    private CollectService collectService;

    //将小说添加进收藏
    @PutMapping("/addNovel")
    public void addNovel(@RequestBody Collect collect){
        collectService.addNovel(collect);
    }

    @DeleteMapping("/deleteNovel")
    public void deleteNovel(Collect collect){
        collectService.deleteNovel(collect);
    }
}
